package com.itheima.stringBuilderDemo;

public class stringBuilderDemo1 {
    public static void main(String[] args) {
        //1.创建对象
        StringBuilder s1 = new StringBuilder("abc");

        //添加元素
        /*s1.append(1);
        s1.append(2.3);
        s1.append(true);
        System.out.println(s1);*/

        //反转
        //s1.reverse();//直接在容器内反转，没有返回值

        //获取长度
        int len = s1.length();
        System.out.println(len);

        System.out.println(s1);
    }
}
